package com.usyk.adminresource;

import com.usyk.util.Party;

import java.util.Map;

/**
 * User: oleksii.usyk@gmail.com
 * Date: 04.12.11
 * Time: 0:02
 */
public class AdminResourceEntry {
    
    private Party party;
    private Map<String,Integer> resourceByRegion;

    public Map<String, Integer> getResourceByRegion() {
        return resourceByRegion;
    }

    public void setResourceByRegion(Map<String, Integer> resourceByRegion) {
        this.resourceByRegion = resourceByRegion;
    }

    public Party getParty() {
        return party;
    }

    public void setParty(Party party) {
        this.party = party;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AdminResourceEntry that = (AdminResourceEntry) o;

        if (party != null ? !party.equals(that.party) : that.party != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return party != null ? party.hashCode() : 0;
    }
}
